/*
 * File      : ApI2c.h
 * Ap3216-I2c应用层驱动实现接口
 * COPYRIGHT (C) 2020, zc
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-7-22      zc           the first version
 */

/**
 * @addtogroup IMX6ULL
 */
/*@{*/
#ifndef _INCLUDE_AP_I2C_H
#define _INCLUDE_AP_I2C_H

/***************************************************************************
* Include Header Files
***************************************************************************/
#include "../include/UsrTypeDef.h"

/**************************************************************************
* Global Macro Definition
***************************************************************************/

/**************************************************************************
* Global Type Definition
***************************************************************************/
struct SApInfo
{
    /*红外线强度*/
    uint16_t ir;

    /*环境光强度*/
    uint16_t als;

    /*接近距离*/
    uint16_t ps;
};

/**************************************************************************
* Global Variable Declaration
***************************************************************************/

/**************************************************************************
* Global Functon Declaration
***************************************************************************/

/*配置ap3216-i2c的驱动*/
void I2cDriverInit(void);

/*释放ap3216-i2c应用资源*/
void I2cDriverRelease(void);

/*读取ap3216(spi接口)的状态信息*/
int I2cDevInfoRead(SApInfo *);
#endif
